package com.guavamail.smtp.command.impl;

import java.io.IOException;

import org.apache.mina.core.session.IoSession;

import com.guavamail.smtp.SMTPContext;
import com.guavamail.smtp.command.AbstractCommand;

public class QUIT extends AbstractCommand {
	public QUIT() {
		super("QUIT", "");
	}

	@Override
	public void execute(String commandString, IoSession ioSession, SMTPContext ctx) throws IOException {
		ctx.getSessionStatus().quit();
		sendResponse(ioSession, "221 Bye");
	}
}
